﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.aspx.cs" Inherits="CJJCH.Web.Manage.MainMenu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Style/SystemCss.css" rel="stylesheet" type="text/css" />
    <script src="../JScript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function MenuClick(obj1,obj2) {
            if ($("#" + obj1).hasClass("menu")) {
                $(".menucur").removeClass("menucur").addClass("menu");
                $(".SubMenu").hide();
                if ($("#" + obj2).html != "") {
                    $("#" + obj1).removeClass("menu").addClass("menucur");
                    $("#"+obj2).show();
                }
            }
            else {
                $("#" + obj1).removeClass("menucur").addClass("menu");
                $("#"+obj2).hide();
            }
        }
        function SubMenuClick(obj1) {
            var varli = document.getElementsByTagName("li");
            for (var i = 0; i < varli.length; i++) {
                if(varli[i].id.indexOf("liItem")>-1){
                    if(varli[i].id==obj1)
                    {
                        varli[i].className = "SubMenucur";
                    }
                    else {
                        varli[i].className="";
                    }
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MainMenu">
        <asp:Repeater ID="rptMenu" runat="server" 
            onitemdatabound="rptMenu_ItemDataBound">
            <ItemTemplate>
                <div class="menu" id="divMenu" runat="server">
                    <asp:HyperLink NavigateUrl="javascript:void(0);" ID="lnkMenu" runat="server"></asp:HyperLink>
                </div>
                <div class="SubMenu" id="divSubMenu" runat="server" style="display: none;">
                    <ul>
                        <asp:Repeater ID="rptSubMenu" runat="server" OnItemDataBound="rptSubMenu_ItemDataBound">
                            <ItemTemplate>
                                <li id="liItem" runat="server">
                                    <asp:HyperLink ID="lnkSubMenu" runat="server" Target="mainFrame"></asp:HyperLink>
                                </li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>
